package com.uuj.dome.entity;

import com.uuj.dome.validator.FlagValidator;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

/**
 * ClassName:DomeEntity
 * PACKAGE_NAME:com.uuj.dome.entity
 */
public class DomeEntity {
    @NotBlank
    @Length(max = 10,min = 2)
    private String name;
    @Min(value = 1)
    private int age;

    @NotBlank
    @Email
    private String email;

    @FlagValidator(value = "1,2,3")
    private String flag;




    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }
}
